/**
 * 试管
 */
testTube= cc.Node.extend({
	ctor:function(parent){
		this._super();
		parent.addChild(this,9);
		this.setTag(TAG_VITRO);
		this.init();
	},
	init : function(){
		this.setVisible(false);
		this.setCascadeOpacityEnabled(true);
		//试管1
		var vitro1 = new Button(this, 10, TAG_VITRO1, "#testTube.png",this.callback);
		vitro1.setPosition(cc.p(-100,-130));
		var line1=new Button(this, 10, TAG_LINE1, "#line.png",this.callback);
		line1.setPosition(cc.p(-100,-215));
		line1.setOpacity(0);
		line1.setScale(0.24);
		//vitro1.setScale(0.8);
		var vitro2 = new Button(this, 10, TAG_VITRO2, "#testTube.png",this.callback);
		vitro2.setPosition(cc.p(50,-130));
		var line2=new Button(this, 10, TAG_LINE2, "#line.png",this.callback);
		line2.setPosition(cc.p(50,-215));
		line2.setOpacity(0);
		line2.setScale(0.24);
		//vitro2.setScale(0.8);
		var vitro3 = new Button(this, 10, TAG_VITRO3, "#testTube.png",this.callback);
		vitro3.setPosition(cc.p(200,-130));
		var line3=new Button(this, 10, TAG_LINE3, "#line.png",this.callback);
		line3.setPosition(cc.p(200,-215));
		line3.setOpacity(0);
		line3.setScale(0.24);
		var pig = new Button(this, 8, TAG_PIG, "#pig.png",this.callback);
		pig.setPosition(cc.p(300,-210));
		pig.setScale(0.6);
 

	},
	
	callback:function(p){
		switch(p.getTag()){
		case TAG_PIG:
		  move1=cc.moveTo(1, cc.p(300,-10));
		  move2=cc.moveTo(1, cc.p(50,-10))	;
		  move3=cc.moveTo(1, cc.p(50,-212))	;
		  p.runAction(cc.sequence(move1,move2,move3,cc.callFunc(function(){

			  this.flowNext();
		  },this)))	;
			break;
		
		}
	},
	flowNext:function(){
		gg.flow.next();
	},
});
